//点击跳转标签类型选择
function lable_add(lable){
	//获取当前页面网址
	url = window.location.href;
	urlHead = url.split('/?');
	reg = /http:\/\/(.*?)\//;
	newUrl = reg.exec(url);//获取到域名头部 匹配到两个值
	urlHead = newUrl[0];//网址头部
	// endUrl = url.replace(urlHead+'index.php/','');//网址后部份


	endUrl = url.substr(url.indexOf('/?'));
	endUrl = endUrl.replace('/?','');
	url = urlHead+'index.php/label/ltype/?'+endUrl +'&labelName='+lable;
	window.location.href =	url;
}
//点击跳转编辑窗口
function lable_type(tid){
	//获取当前页面网址
	url = window.location.href;
	//将选择类型赋值
	url = url +'&ltype='+tid;
	window.location.href =	url;
}
//修改标签类型
function editType(){
	url = window.location.href;
	reg = /http:\/\/(.*?)&ltype/;
	newUrl = reg.exec(url);
	url = newUrl[0].replace('&ltype','');
	window.location.href=url;

}
//有值的标签点击修改
function edit_label(lable,tid){
	//判断是否为空如果有类型就直接跳转修改
	if(tid !=''){
			//获取当前页面网址
		url = window.location.href;
		urlHead = url.split('/?');
		reg = /http:\/\/(.*?)\//;
		newUrl = reg.exec(url);//获取到域名头部 匹配到两个值
		urlHead = newUrl[0];//网址头部
		// endUrl = url.replace(urlHead+'index.php/','');//网址后部份


		endUrl = url.substr(url.indexOf('/?'));
		endUrl = endUrl.replace('/?','');
		url = urlHead+'index.php/label/ltype/?'+endUrl +'&labelName='+lable+'&ltype='+tid;
		window.location.href =	url;
	}
}